package org.example.petitionplatformsystem.webRTC;

import lombok.Getter;
import lombok.Setter;

import java.util.ArrayList;
import java.util.List;
import java.util.Objects;

@Getter
@Setter
public class CallingRoom {
    private List<Long> callingUsersList;
    private Long roomId;
    private boolean isFree;

    public CallingRoom(Long roomId){
        this.roomId = roomId;
        callingUsersList = new ArrayList<>();
        isFree = true;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        CallingRoom that = (CallingRoom) o;
        return Objects.equals(roomId, that.roomId);
    }

    @Override
    public int hashCode() {
        return Objects.hash(roomId);
    }
}
